package smecta.client.print.service;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import smecta.client.print.domain.ScpProductSpecs;
import smecta.client.print.mapper.ScpProductSpecsMapper;
import tk.mybatis.mapper.entity.Example;

@Service
public class ScpProductSpecsService extends BaseService<ScpProductSpecs> {

    @Autowired
    private ScpProductSpecsMapper scpProductSpecsMapper;

    public ScpProductSpecs findByGuiGe(String guiGe){
        if (StringUtils.isBlank(guiGe)){
            return new ScpProductSpecs();
        }
        Example example = new Example(ScpProductSpecs.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("guige",guiGe);
        return selectOneByExample(example);
    }

}
